/*
Simple Graph-library, based on SDL.
Writed by SochiX(sochix.blogspot.com)
2010
*/

#ifndef GRAPH_H
#define GRAPH_H

#include "SDL.h"   
#include "point.hpp"
#include <iostream>
#include <math.h>
#include "..\def.hpp"

class Graph
{
	private:
	int widht;
	int height;
	int DoubleToRGB(double color);
	public:
	Graph();
	~Graph() {SDL_Quit(); puts("All right. SDL terminated.");}; 
	void Flip(SDL_Surface *screen) {SDL_Flip(screen);};
	void LockSurface(SDL_Surface *screen);
	void UnlockSurface(SDL_Surface *screen);
	void DrawPixel(SDL_Surface *screen, Point myPoint);	
	void SetSurface(SDL_Surface **screen, int x,int y);
	bool SaveSurface(SDL_Surface *screen, const char* filename);
};

#endif //GRAPH_H//
